//
//  SPSeekViewController.m
//  Sport
//
//  Created by Cass on 2017/11/26.
//  Copyright © 2017年 Cass. All rights reserved.
//

#import "SPSeekViewController.h"

@interface SPSeekViewController ()<UITextFieldDelegate,UISearchBarDelegate>
@property (weak, nonatomic) IBOutlet UISearchBar *searchBar;
@property (weak, nonatomic) IBOutlet UITableView *tableView;

@end

@implementation SPSeekViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.searchBar.delegate = self;
    self.searchBar.searchTextPositionAdjustment =  UIOffsetMake((self.searchBar.bounds.size.width - 80)/2, 0);
    
    
    [self.searchBar setSearchTextFieldTextColor:UIColorFromRGB(0x9a9a9a) placeholderColor:UIColorFromRGB(0x9a9a9a) backgroundColor:[UIColor whiteColor] borderColor:UIColorFromRGB(0xdddddd) cornerRadius:12];
}

- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{
    self.searchBar.searchTextPositionAdjustment = UIOffsetMake(0, 0);
    
    return YES;
}

- (BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar{
    searchBar.searchTextPositionAdjustment = UIOffsetMake(0, 0);
    return YES;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
}


@end
